<!-- 页面 -->
<template>
  <s-layout title="卖方仓库">
    <su-sticky bgColor="#fff">
      
      <su-tabs
        :list="tabMaps"
        :scrollable="false"
        @change="onTabsChange"
        :current="state.currentTab"
      ></su-tabs>
    </su-sticky>
    <s-empty
      v-if="state.pagination.total === 0"
      icon="/static/order-empty.png"
      text="暂无订单"
    ></s-empty>
    <view v-if="state.pagination.total > 0">
      <!-- 待交易商品列表 -->
      <view
        v-if="tabMaps[state.currentTab].value === 'pending'"
        class="bg-white goods-list-card-box ss-r-10 ss-m-t-14 ss-m-20"
        v-for="goods in state.pagination.data"
        :key="goods.id"
      >
        <view class="goods-info-container ss-flex ss-p-x-20 ss-p-y-20">
          <!-- 商品图片 -->
          <view class="goods-image-container">
            <image 
              :src="sheep.$url.cdn(goods.goods_image)"
              class="goods-image" 
              mode="aspectFill"
              :lazy-load="true"
            ></image>
          </view>
          
          <!-- 商品信息 -->
          <view class="goods-details-container ss-flex-1 ss-m-l-20">
            <view class="goods-basic-info">
              <view class="goods-title">{{ goods.goods_title }}</view>
              <view class="goods-sku" v-if="goods.goods_sku_text">{{ goods.goods_sku_text }}</view>
              <view class="goods-price-row ss-flex ss-col-center ss-m-t-10">
                <view class="goods-price">{{ goods.goods_price }}</view>
                <view class="goods-num">x{{ goods.goods_num }}</view>
              </view>
            </view>
            
            <!-- 寄售信息 -->
            <view class="consign-info ss-m-t-15">
              <view class="info-row ss-flex ss-col-center">
                <view class="info-label">寄售人:</view>
                <view class="info-value">{{ goods.consignor_name || '' }}</view>
              </view>
              <view class="info-row ss-flex ss-col-center ss-m-b-6">
                <view class="info-label">寄售日期:</view>
                <view class="info-value">{{ goods.consign_date || '' }}</view>
              </view>
              <view class="info-row ss-flex ss-col-center ss-m-b-6">
                <view class="info-label">预计交易:</view>
                <view class="info-value">{{ goods.expected_trade_time || '' }}</view>
              </view>
              <view class="info-row ss-flex ss-col-center ss-m-b-6" v-if="goods.unpaid_order_id">
                <view class="info-label">待支付订单ID:</view>
                <view class="info-value">{{ goods.unpaid_order_id }}</view>
              </view>
              <view class="info-row ss-flex ss-col-center ss-m-b-6" v-if="goods.unpaid_order_id">
                <view class="info-label">待支付买方姓名:</view>
                <view class="info-value">{{ goods.unpaid_user_name || '' }}</view>
              </view>
              
              
            </view>
          </view>
        </view>
      </view>
      
      <!-- 订单列表 -->
      <view
        v-else
        class="bg-white order-list-card-box ss-r-10 ss-m-t-14 ss-m-20"
        v-for="order in state.pagination.data"
        :key="order.id"
        @tap="onOrderDetail(order.order_sn)"
      >
        <view class="order-card-header ss-flex ss-col-center ss-row-between ss-p-x-20">
          <view class="order-no">订单号：{{ order.order_sn }}</view>
          <view class="order-state ss-font-26" :class="formatOrderColor(order.status_code)">
			<text>{{order.status_text}}</text>
		  </view>
        </view>
        <view class="border-bottom" v-for="item in order.items" :key="item.id">
          <view class="goods-info-container ss-flex ss-p-x-20 ss-p-y-20">
            <!-- 商品图片 -->
            <view class="goods-image-container">
              <image 
                :src="sheep.$url.cdn(item.goods_image)"
                class="goods-image" 
                mode="aspectFill"
                :lazy-load="true"
              ></image>
            </view>
            
            <!-- 商品信息和买家卖家信息 -->
            <view class="goods-details-container ss-flex-1 ss-m-l-20">
              <!-- 商品基本信息 -->
              <view class="goods-basic-info">
                <view class="goods-title">{{ item.goods_title }}</view>
                <view class="goods-sku" v-if="item.goods_sku_text">{{ item.goods_sku_text }}</view>
                <view class="goods-price-row ss-flex ss-col-center ss-m-t-10">
                  <view class="goods-price">￥{{ item.goods_price }}</view>
                  <view class="goods-num">x{{ item.goods_num }}</view>
                  <view v-if="order.score_amount" class="score-info ss-flex ss-col-center ss-m-l-10">
                    <image
                      :src="sheep.$url.static('/assets/addons/shopro/uniapp/goods/score1.svg')"
                      class="score-img"
                    ></image>
                    <view>{{ order.score_amount }}</view>
                  </view>
                </view>
              </view>
              
              <!-- 买家卖家信息 -->
              <view class="user-info-inline ss-m-t-15">
                <view class="user-info-row ss-flex ss-col-center ss-m-b-8">
                  <view class="user-label seller-label">卖家</view>
                  <view class="user-name">{{ order.jishou_name || '未知卖家' }}</view>
                  <view class="user-phone">{{ order.jishou_phone || '' }}</view>
                </view>
                <view class="user-info-row ss-flex ss-col-center">
                  <view class="user-label buyer-label">买家</view>
                  <view class="user-name">{{ order.buyer_name || '未知买家' }}</view>
                  <view class="user-phone">{{ order.buyer_phone || '' }}</view>
                </view>
              </view>
            </view>
          </view>
        </view>
        
        <!-- 时间信息和总金额 -->
        <view class="time-amount-section ss-m-t-15 ss-p-x-20 ss-flex ss-row-between">
          <!-- 时间信息 -->
          <view class="time-info-section">
            <view class="time-info-row ss-flex ss-col-center ss-m-b-6">
              <view class="time-label">下单时间</view>
              <view class="time-value">{{ order.create_time || '' }}</view>
            </view>
            <view class="time-info-row ss-flex ss-col-center ss-m-b-6">
              <view class="time-label">抢单时间</view>
              <view class="time-value">{{ order.create_time || '' }}</view>
            </view>
            <view class="time-info-row ss-flex ss-col-center">
              <view class="time-label">完成时间</view>
              <view class="time-value">{{ order.pay_time || '' }}</view>
            </view>
          </view>
          
          <!-- 总金额 -->
          <view class="amount-info-section ss-flex ss-col-center">
            <view class="amount-row ss-flex ss-col-center">
              <view class="amount-label">总金额:</view>
              <view class="amount-value">￥{{ order.order_amount }}</view>
              <view v-if="order.score_amount" class="score-amount ss-flex ss-col-center ss-m-l-8">
                <view>+</view>
                <image
                  :src="sheep.$url.static('/assets/addons/shopro/uniapp/goods/score1.svg')"
                  class="score-img"
                ></image>
                <view>{{ order.score_amount }}</view>
              </view>
            </view>
          </view>
        </view>
        <view
          class="order-card-footer ss-flex ss-col-center ss-p-x-20"
          :class="order.btns.length > 3 ? 'ss-row-between' : 'ss-row-right'"
        >
          <!-- <su-popover>
            <button class="more-btn ss-reset-button" @click.stop>更多</button>
            <template #content>
              <view class="more-item-box">
                <view class="more-item ss-flex ss-col-center ss-reset-button">
                  <view class="item-title">删除订单</view>
                </view>
                <view class="more-item ss-flex ss-col-center ss-reset-button">
                  <view class="item-title">查看发票</view>
                </view>
                <view class="more-item ss-flex ss-col-center ss-reset-button">
                  <view class="item-title">评价晒单</view>
                </view>
              </view>
            </template>
          </su-popover> -->
          <view class="ss-flex ss-col-center">
            <!-- <button
              v-if="order.btns.includes('groupon')"
              class="tool-btn ss-reset-button"
              @tap.stop="onOrderGroupon(order)"
            >
              {{ order.status_code === 'groupon_ing' ? '邀请拼团' : '拼团详情' }}
            </button> -->
            <!-- <button
              v-if="order.btns.includes('invoice')"
              class="tool-btn ss-reset-button"
              @tap.stop="onOrderInvoice(order.invoice?.id)"
            >
              查看发票
            </button> -->
            <button
              v-if="order.btns.length === 0"
              class="tool-btn ss-reset-button"
              @tap.stop="onOrderDetail(order.order_sn)"
            >
              查看详情
            </button>

            <!-- <button
              v-if="order.btns.includes('confirm')"
              class="tool-btn ss-reset-button"
              @tap.stop="onConfirm(order)"
            >
              确认收货
            </button> -->
			
			<button
			  v-if="order.btns.includes('confirm_pay')"
			  class="tool-btn ss-reset-button ui-BG-Main-Gradient"
			  @tap.stop="onConfirmPay(order)"
			>
			  确认收款
			</button>

            <!-- <button
              v-if="order.btns.includes('express')"
              class="tool-btn ss-reset-button"
              @tap.stop="onExpress(order.id)"
            >
              查看物流
            </button> -->

            <!-- <button
              v-if="order.btns.includes('apply_refund')"
              class="tool-btn ss-reset-button"
              @tap.stop="onRefund(order.id)"
            >
              申请退款
            </button> -->
            <!-- <button
              v-if="order.btns.includes('re_apply_refund')"
              class="tool-btn ss-reset-button"
              @tap.stop="onRefund(order.id)"
            >
              重新退款
            </button> -->

            <!-- <button
              v-if="order.btns.includes('cancel')"
              class="tool-btn ss-reset-button"
              @tap.stop="onCancel(order.id)"
            >
              取消订单
            </button> -->

            <!-- <button
              v-if="order.btns.includes('comment')"
              class="tool-btn ss-reset-button"
              @tap.stop="onComment(order.order_sn)"
            >
              评价晒单
            </button> -->

            <!-- <button
              v-if="order.btns.includes('delete')"
              class="delete-btn ss-reset-button"
              @tap.stop="onDelete(order.id)"
            >
              删除订单
            </button> -->

            <!-- <button
              v-if="order.btns.includes('pay')"
              class="tool-btn ss-reset-button ui-BG-Main-Gradient"
              @tap.stop="onPay(order.order_sn)"
            >
              继续支付
            </button> -->
          </view>
        </view>
      </view>
    </view>

    <!-- 加载更多 -->
    <uni-load-more
      v-if="state.pagination.total > 0"
      :status="state.loadStatus"
      :content-text="{
        contentdown: '上拉加载更多',
      }"
      @tap="loadmore"
    />
  </s-layout>
</template>

<script setup>
  import { computed, reactive } from 'vue';
  import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
  import { formatOrderColor } from '@/sheep/hooks/useGoods';
  import sheep from '@/sheep';
  import _ from 'lodash';
  import { isEmpty } from 'lodash';

  const tradeManaged = computed(() => sheep.$store('app').has_wechat_trade_managed);

  const pagination = {
    data: [],
    current_page: 1,
    total: 1,
    last_page: 1,
  };
  // 数据
  const state = reactive({
    currentTab: 0,
    currentOrderType: 2, // 新增：当前选中的订单类型
    pagination: {
      data: [],
      current_page: 1,
      total: 1,
      last_page: 1,
    },
    loadStatus: '',
    deleteOrderId: 0,
    error: 0,
  });

  const tabMaps = [
    {
      name: '全部',
      value: 'all',
    },
    
    {
      name: '交易中',
      value: 'nosend',
    },
    {
      name: '已完成',
      value: 'nocomment',
    },
    {
      name: '待交易',
      value: 'pending',
    },
  ];

  // 新增：订单类型定义
  const orderTypes = [
    {
      name: '全部订单',
      value: 'all',
    },
    {
      name: '积分订单',
      value: 'score',
    },
    {
      name: '秒杀订单',
      value: 'seckill',
    },
  ];

  // 切换选项卡
  function onTabsChange(e) {
    if (state.currentTab === e.index) return;

    state.pagination = pagination;

    state.currentTab = e.index;

    getOrderList();
  }

  // 新增：切换订单类型
  function onOrderTypeChange(index) {
    if (state.currentOrderType === index) return;
    
    state.currentOrderType = index;
    state.pagination = pagination;
    state.currentTab = 0; // 重置为全部状态
    
    getOrderList();
  }

  // 订单详情
  function onOrderDetail(orderSN) {
    sheep.$router.go('/pages/order/detail', {
      orderSN,
    });
  }

  // 分享拼团
  function onOrderGroupon(order) {
    sheep.$router.go('/pages/activity/groupon/detail', {
      id: order.ext.groupon_id,
    });
  }

  // 查看发票
  function onOrderInvoice(invoiceId) {
    sheep.$router.go('/pages/order/invoice', {
      invoiceId,
    });
  }

  // 继续支付
  function onPay(orderSN) {
    sheep.$router.redirect('/pages/pay/index', {
      orderSN,
    });
  }

  // 评价
  function onComment(orderSN) {
    sheep.$router.go('/pages/goods/comment/add', {
      orderSN,
    });
  }

  // 确认收货
  async function onConfirm(order, ignore = false) {
    // 需开启确认收货组件
    // todo:
    // 1.怎么检测是否开启了发货组件功能？如果没有开启的话就不能在这里return出去
    // 2.如果开启了走mpConfirm方法,需要在App.vue的show方法中拿到确认收货结果
    if (
      sheep.$platform.name === 'WechatMiniProgram' &&
      !isEmpty(order.wechat_extra_data) &&
      tradeManaged.value === 1 &&
      !ignore
    ) {
      mpConfirm(order);
      return;
    }

    // 正常的确认收货流程
    const { code, data } = await sheep.$api.order.confirm(order.id);
    if (code === 1) {
      // let index = state.pagination.data.findIndex((order) => order.id === orderId);
      // state.pagination.data[index] = data;
      state.pagination = pagination;
      getOrderList();
    }
  }
  
  // 确认收款
  async function onConfirmPay(order, ignore = false) {
    uni.showModal({
      title: '确认收款',
      content: `确认已收到买家支付的 ￥${order.order_amount} 吗？`,
      success: async function (res) {
        if (res.confirm) {
          // 需开启确认收货组件
          // todo:
          // 1.怎么检测是否开启了发货组件功能？如果没有开启的话就不能在这里return出去
          // 2.如果开启了走mpConfirm方法,需要在App.vue的show方法中拿到确认收货结果
          if (
            sheep.$platform.name === 'WechatMiniProgram' &&
            !isEmpty(order.wechat_extra_data) &&
            tradeManaged.value === 1 &&
            !ignore
          ) {
            mpConfirm(order);
            return;
          }
        
          // 正常的确认收货流程
          const { code, data } = await sheep.$api.order.confirmPay(order.id);
          if (code === 1) {
            // let index = state.pagination.data.findIndex((order) => order.id === orderId);
            // state.pagination.data[index] = data;
            state.pagination = pagination;
            getOrderList();
          }
        }
      },
    });

    
  }

  // #ifdef MP-WEIXIN
  // 小程序确认收货组件
  function mpConfirm(order) {
    if (!wx.openBusinessView) {
      sheep.$helper.toast(`请升级微信版本`);
      return;
    }
    wx.openBusinessView({
      businessType: 'weappOrderConfirm',
      extraData: {
        merchant_trade_no: order.wechat_extra_data.merchant_trade_no,
        transaction_id: order.wechat_extra_data.transaction_id,
      },
      success(response) {
        console.log('success:', response);
        if (response.errMsg === 'openBusinessView:ok') {
          if (response.extraData.status === 'success') {
            onConfirm(order, true);
          }
        }
      },
      fail(error) {
        console.log('error:', error);
      },
      complete(result) {
        console.log('result:', result);
      },
    });
  }
  // #endif

  // 查看物流
  async function onExpress(orderId) {
    sheep.$router.go('/pages/order/express/list', {
      orderId,
    });
  }

  // 取消订单
  async function onCancel(orderId) {
    uni.showModal({
      title: '提示',
      content: '确定要取消订单吗?',
      success: async function (res) {
        if (res.confirm) {
          const { code, data } = await sheep.$api.order.cancel(orderId);
          if (code === 1) {
            let index = state.pagination.data.findIndex((order) => order.id === orderId);
            state.pagination.data[index] = data;
          }
        }
      },
    });
  }

  // 删除订单
  function onDelete(orderId) {
    uni.showModal({
      title: '提示',
      content: '确定要删除订单吗?',
      success: async function (res) {
        if (res.confirm) {
          const { code, data } = await sheep.$api.order.delete(orderId);
          if (code === 1) {
            let index = state.pagination.data.findIndex((order) => order.id === orderId);
            state.pagination.data.splice(index, 1);
          }
        }
      },
    });
  }

  // 申请退款
  async function onRefund(orderId) {
    uni.showModal({
      title: '提示',
      content: '确定要申请退款吗?',
      success: async function (res) {
        if (res.confirm) {
          // #ifdef MP
          sheep.$platform.useProvider('wechat').subscribeMessage('order_refund');
          // #endif
          const { code, data } = await sheep.$api.order.applyRefund(orderId);
          if (code === 1) {
            let index = state.pagination.data.findIndex((order) => order.id === orderId);
            state.pagination.data[index] = data;
          }
        }
      },
    });
  }

  // 获取订单列表
  async function getOrderList(page = 1, list_rows = 10) {
    state.loadStatus = 'loading';
    
    let params = {
      type: tabMaps[state.currentTab].value,
      list_rows,
      page,
	  order_type:'seckill'
    };
    
    // 添加订单类型筛选
    if (state.currentOrderType > 0) {
      params.order_type = orderTypes[state.currentOrderType].value;
    }
    
    let res;
    // 如果是待交易tab，调用待交易商品列表API
    if (tabMaps[state.currentTab].value === 'pending') {
      res = await sheep.$api.order.pendingTradeList(params);
    } else {
      res = await sheep.$api.order.jishouOrderList(params);
    }
    
    state.error = res.error;
    if (res.code === 1) {
      let orderList = _.concat(state.pagination.data, res.data.data);
      state.pagination = {
        ...res.data,
        data: orderList,
      };

      if (state.pagination.current_page < state.pagination.last_page) {
        state.loadStatus = 'more';
      } else {
        state.loadStatus = 'noMore';
      }
    }
  }

  onLoad(async (options) => {
    if (options.type) {
      state.currentTab = options.type;
    }
    getOrderList();
  });

  // 加载更多
  function loadmore() {
    if (state.loadStatus !== 'noMore') {
      getOrderList(state.pagination.current_page + 1);
    }
  }

  // 上拉加载更多
  onReachBottom(() => {
    loadmore();
  });

  //下拉刷新
  onPullDownRefresh(() => {
    state.pagination = pagination;
    getOrderList();
    setTimeout(function () {
      uni.stopPullDownRefresh();
    }, 800);
  });
</script>

<style lang="scss" scoped>
  // 订单类型筛选样式
  .order-type-filter {
    background: #fff;
    border-bottom: 1rpx solid #f5f5f5;
    
    .filter-title {
      font-size: 28rpx;
      color: #333;
      font-weight: 500;
    }
    
    .filter-tabs {
      gap: 20rpx;
      
      .filter-tab {
        padding: 12rpx 24rpx;
        background: #f8f8f8;
        border-radius: 20rpx;
        font-size: 26rpx;
        color: #666;
        transition: all 0.3s ease;
        
        &.active {
          background: #ff6600;
          color: #fff;
        }
      }
    }
  }

  .score-img {
    width: 36rpx;
    height: 36rpx;
    margin: 0 4rpx;
  }
  .tool-btn {
    width: 160rpx;
    height: 60rpx;
    background: #f6f6f6;
    font-size: 26rpx;
    border-radius: 30rpx;
    margin-right: 10rpx;

    &:last-of-type {
      margin-right: 0;
    }
  }
  .delete-btn {
    width: 160rpx;
    height: 56rpx;
    color: #ff3000;
    background: #fee;
    border-radius: 28rpx;
    font-size: 26rpx;
    margin-right: 10rpx;
    line-height: normal;

    &:last-of-type {
      margin-right: 0;
    }
  }

  .apply-btn {
    width: 140rpx;
    height: 50rpx;
    border-radius: 25rpx;
    font-size: 24rpx;
    border: 2rpx solid #dcdcdc;
    line-height: normal;
    margin-left: 16rpx;
  }

  .swiper-box {
    flex: 1;

    .swiper-item {
      height: 100%;
      width: 100%;
    }
  }

  .order-list-card-box {
    .order-card-header {
      height: 80rpx;

      .order-no {
        font-size: 26rpx;
        font-weight: 500;
      }

      .order-state {
        font-weight: 500;
      }
    }

    // 商品信息容器样式
    .goods-info-container {
      .goods-image-container {
        width: 160rpx;
        height: 160rpx;
        flex-shrink: 0;
        background: #f5f5f5;
        border-radius: 8rpx;
        overflow: hidden;
        
        .goods-image {
          width: 100%;
          height: 100%;
          border-radius: 8rpx;
          display: block;
        }
      }
      
      .goods-details-container {
        .goods-basic-info {
          .goods-title {
            font-size: 28rpx;
            color: #333;
            font-weight: 500;
            line-height: 1.4;
            margin-bottom: 8rpx;
          }
          
          .goods-sku {
            font-size: 24rpx;
            color: #999;
            margin-bottom: 8rpx;
          }
          
          .goods-price-row {
            .goods-price {
              font-size: 28rpx;
              color: #ff6600;
              font-weight: 600;
            }
            
            .goods-num {
              font-size: 24rpx;
              color: #666;
              margin-left: 12rpx;
            }
            
            .score-info {
              .score-img {
                width: 24rpx;
                height: 24rpx;
                margin-right: 4rpx;
              }
              
              font-size: 24rpx;
              color: #666;
            }
          }
        }
        
        // 买家卖家信息样式（内联）
        .user-info-inline {
          .user-info-row {
            .user-label {
              padding: 4rpx 8rpx;
              border-radius: 4rpx;
              font-size: 20rpx;
              font-weight: 500;
              margin-right: 8rpx;
              min-width: 40rpx;
              text-align: center;
              
              &.seller-label {
                background: #fff2e8;
                color: #ff6600;
              }
              
              &.buyer-label {
                background: #e6f7ff;
                color: #1890ff;
              }
            }
            
            .user-name {
              font-size: 24rpx;
              color: #333;
              font-weight: 500;
              margin-right: 12rpx;
            }
            
            .user-phone {
              font-size: 22rpx;
              color: #666;
              font-family: 'Courier New', monospace;
            }
          }
        }
      }
    }

    // 时间信息和总金额容器样式
    .time-amount-section {
      // 时间信息样式
      .time-info-section {
        .time-info-row {
          .time-label {
            font-size: 22rpx;
            color: #666;
            font-weight: 500;
            margin-right: 12rpx;
            min-width: 80rpx;
          }
          
          .time-value {
            font-size: 22rpx;
            color: #333;
            font-family: 'Courier New', monospace;
          }
        }
      }
      
      // 总金额样式
      .amount-info-section {
        .amount-row {
          .amount-label {
            font-size: 24rpx;
            color: #333;
            font-weight: 500;
            margin-right: 8rpx;
          }
          
          .amount-value {
            font-size: 28rpx;
            color: #ff6600;
            font-weight: 600;
            font-family: OPPOSANS;
          }
          
          .score-amount {
            font-size: 24rpx;
            color: #666;
            
            .score-img {
              width: 24rpx;
              height: 24rpx;
              margin: 0 4rpx;
            }
          }
        }
      }
    }
  }

  // 待交易商品列表样式
  .goods-list-card-box {
    border-radius: 20rpx;
    box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
    
    .goods-info-container {
      .goods-image-container {
        width: 160rpx;
        height: 160rpx;
        background: #f5f5f5;
        border-radius: 12rpx;
        overflow: hidden;
        flex-shrink: 0;
        display: block;
        
        .goods-image {
          width: 100%;
          height: 100%;
        }
      }
      
      .goods-details-container {
        .goods-basic-info {
          .goods-title {
            font-size: 28rpx;
            color: #333;
            font-weight: 500;
            line-height: 1.4;
            margin-bottom: 8rpx;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
          }
          
          .goods-sku {
            font-size: 24rpx;
            color: #999;
            margin-bottom: 8rpx;
          }
          
          .goods-price-row {
            .goods-price {
              font-size: 32rpx;
              color: #ff6600;
              font-weight: 600;
              font-family: OPPOSANS;
            }
            
            .goods-num {
              font-size: 24rpx;
              color: #666;
              margin-left: 16rpx;
            }
          }
        }
        
        .consign-info {
          .info-row {
            .info-label {
              font-size: 24rpx;
              color: #666;
              font-weight: 500;
              margin-right: 12rpx;
              min-width: 120rpx;
            }
            
            .info-value {
              font-size: 24rpx;
              color: #333;
              flex: 1;
            }
          }
        }
      }
    }
  }

  .pay-box {
    .discounts-title {
      font-size: 24rpx;
      line-height: normal;
      color: #999999;
    }

    .discounts-money {
      font-size: 24rpx;
      line-height: normal;
      color: #999;
      font-family: OPPOSANS;
    }

    .pay-color {
      color: #333;
    }
  }

  .order-card-footer {
    height: 100rpx;

    .more-item-box {
      padding: 20rpx;

      .more-item {
        height: 60rpx;

        .title {
          font-size: 26rpx;
        }
      }
    }

    .more-btn {
      color: $dark-9;
      font-size: 24rpx;
    }

    .content {
      width: 154rpx;
      color: #333333;
      font-size: 26rpx;
      font-weight: 500;
    }
  }

  :deep(.uni-tooltip-popup) {
    background: var(--ui-BG);
  }
  .warning-color {
    color: #faad14;
  }
  .danger-color {
    color: #ff3000;
  }
  .success-color {
    color: #52c41a;
  }
  .info-color {
    color: #999999;
  }
</style>
